
//MD5 verification macro
#ifdef WORDS_BIGENDIAN
#define REVERSE( p, n ) Reverse( p, n )
#else
#define REVERSE( p, n )
#endif
#define F1( x, y, z ) ((z) ^ ((x) & ((y) ^ (z))))
#define F2( x, y, z ) F1((z), (x), (y))
#define F3( x, y, z ) ((x) ^ (y) ^ (z))
#define F4( x, y, z ) ((y) ^ ((x) | ~(z)))
#define MD5_DO( f, w, x, y, z, data, s ) \
	( w += f(x, y, z) + data,  w = w<<s | w>>(32-s),  w += x )

std::string strFormat(const char *fmt, ...);

//md5 verify structure
struct md5_s
{
	unsigned long long int i_bits;                            /* Total written bits */
	unsigned int p_digest[4];                                 /* The MD5 digest */
	unsigned int p_data[16];                                  /* Buffer to cache non-aligned writes */
};
void InitMD5( struct md5_s *p_md5 );
void AddMD5( struct md5_s *p_md5, const void *p_src, size_t i_len );
void EndMD5( struct md5_s *p_md5 );